package com.neusoft.elmboot.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.neusoft.elmboot.service.RatingService;
import com.neusoft.elmboot.util.APIResponse;

@RestController
@RequestMapping("/Rating")
public class RatingController {

	@Autowired
	private RatingService ratingService;
	
	@GetMapping
	public APIResponse getRatingsByBusinessId(int businessId){
		return APIResponse.success(ratingService.listRatingsByBusinessId(businessId));
	}
	
}
